package com.example.pertecttime.activity.login;

import android.content.Context;

import com.example.pertecttime.base.BaseModel;
import com.example.pertecttime.base.BasePresenter;
import com.example.pertecttime.base.BaseResult;
import com.example.pertecttime.base.Baseview;
import com.example.pertecttime.entity.User;

import rx.Observable;

/**
 * Created by 半生瓜 on 2017/7/17.
 */

public interface loginContract {

    interface Model extends BaseModel {
        Observable<BaseResult<User>> getLoginModel(User user);
    }

    interface View extends Baseview {
        void loginSuccess(User user);

        void loginFail(int s);

        Context getContext();

        void onCheckBoxResult(boolean remembercode, boolean antucode, String username, String password);
    }

    abstract class Presenter extends BasePresenter<Model, View> {


        public abstract void dologin(boolean remembercode, boolean antucode, String un, String pwd);

        public abstract void savaRecord(Boolean r, Boolean antu, String un, String psd);

        public abstract void onCreate(Context c);
    }
}
